﻿@{
    ViewBag.Title = "forgotpassword";
    Layout = "~/Views/Shared/_Main.cshtml";
}
<div class="content">
    <div class="container">
        <h2>
            找回密码</h2>
        <p class="big grey">
            如果您忘记了账户登录密码，可通过帐号(邮箱)找回密码</p>
        <div class="row">
            <div id="box" class="span8">
                <form id="form1" action="/account/forgotpassword" method="post" class="form-horizontal">
                <input type="hidden" name="token" />
                <div class="control-group">
                    <label class="control-label">
                        用户名：</label>
                    <div class="controls">
                        <input type="text" name="Username" value="@ViewBag.Username" 
                            class="{required:true,email:true}" placeholder="请输入帐号或邮箱" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">
                        验证码：</label>
                    <div class="controls">
                        <div class="span3" style="margin-left: 0px;">
                            <input type="text" id="txtvaildcode" name="validcode" class="pull-left {required:true,minlength:4,maxlength:4}"
                                placeholder="请输入右侧验证码" />
                        </div>
                        <div id="codeimg" style="margin-left: 10px;">
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <input type="submit" value="找回密码" class="btn btn-info" style="width: 20%" />
                        @if (!String.IsNullOrEmpty(ViewBag.Error))
                        {
                            <span class="badge badge-important">@ViewBag.Error</span>
                        }
                    </div>
                </div>
                </form>
            </div>
            <div class="span4">
                <!-- Contact box -->
                <div class="scontact">
                    <!-- Title -->
                    <h3 class="color">
                        联系我们</h3>
                    <!-- Phone, email and address with font awesome icon -->
                    <p>
                        如果您多次尝试或根据我们提供的帮助任然无法解决问题，请与我们联系！</p>
                    <p>
                        <i class="icon-phone"></i>QQ<strong>:</strong> 634691728</p>
                    <p>
                        <i class="icon-envelope-alt"></i>Email<strong>:</strong> @SiteResource.Domain.Replace("www.", "support@")</p>
                </div>
            </div>
        </div>
        <hr />
        <div class="border">
        </div>
        @Html.Partial("~/views/shared/partial/_article.cshtml")
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/plug.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        var validation = new plug.BindValidCode();
        $(function () {
            validation.BindValidator();
            $('#form1').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
        function Refalsh(sender) {
            validation.Refalsh(sender);
        }
    </script>
}
